Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0.3 -> main] Trace_API: Fix get_transaction_trace endpoint fails to return transaction trace if the initial block including the transaction forks #970

Merged
merged 12 commits into from
Oct 23, 2024

Conversation

linh2931
Copy link
Member

Forward #966

Trace_API's get_transaction_trace is supposed to return the transaction trace of a transaction. But the current implementation only finds any block whose block number matches the first block proposing the transaction; this block might not contains the transaction due to forking.

This PR

  • adds a test reproducing the problem and a test for normal case.
  • fixes the problem by not updating trx_block_num in get_trx_block_number if the block does not include the transaction.

Resolves #942

@linh2931 linh2931 merged commit 37e9171 into main Oct 23, 2024
36 checks passed
@linh2931 linh2931 deleted the merge_fix_trace_api_get_trx_block_number branch October 23, 2024 14:54
@ericpassmore ericpassmore added the bug The product is not working as was intended. label Oct 25, 2024
@ericpassmore
Copy link
Contributor

Note:start
category: System Stability
component: Trace_API
summary: Properly handle case when initial block forks out and return transaction traces.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The product is not working as was intended.
Projects
None yet
4 participants